﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.ConcreteMixDesign.Topics
{
    public class Answer : AuditedEntity<Guid>
    {
        public Guid TopicId { get; set; }

        public AnswerType AnswerType { get; set; }
        /// <summary>
        /// 水泥标准值
        /// </summary>
        public double CementValue { get; set; }
        /// <summary>
        /// 水泥比例
        /// </summary>
        public double CementProportion { get; set; }
        /// <summary>
        /// 水标准值值
        /// </summary>
        public double WaterValue { get; set; }
        /// <summary>
        /// 水比例
        /// </summary>
        public double WaterProportion { get; set; }
        /// <summary>
        /// 砂标准值
        /// </summary>
        public double SandValue { get; set; }
        /// <summary>
        /// 砂比例
        /// </summary>
        public double SandProportion { get; set; }
        /// <summary>
        /// 碎石标准值
        /// </summary>
        public double GravelValue { get; set; }
        /// <summary>
        /// 碎石比例值
        /// </summary>
        public double GravelProportion { get; set; }
        /// <summary>
        /// 偏差值
        /// </summary>
        public float DeviationValue { get; set; } = 0;
        public Answer() { }

        public Answer(Guid guid,Guid topicId, AnswerType answerType, double cementValue, double cementProportion, double waterValue, double waterProportion, double sandValue, double sandProportion, double gravelValue, double gravelProportion, float deviationValue = 0)
        {
            Id = guid;
            TopicId = topicId;
            AnswerType = answerType;
            CementValue = cementValue;
            CementProportion = cementProportion;
            WaterValue = waterValue;
            WaterProportion = waterProportion;
            SandValue = sandValue;
            SandProportion = sandProportion;
            GravelValue = gravelValue;
            GravelProportion = gravelProportion;
            DeviationValue = deviationValue;
        }
        public void UpdateId()
        {
            Id = Guid.NewGuid();
        }
    }
}
